import { BattleState } from "../../../new/common/BattleState";
import { EventId } from "../../../new/event/EventId";
import EventMgr from "../../../new/event/EventMgr";
import { BattleRoleUI } from "../../roleUI/BattleRoleUI";
import { ActionBase } from "./ActionBase";

/**
 * 行为-回到出生点
 */
export class GoBack extends ActionBase {

    constructor(casterUI: BattleRoleUI) {
        super()
        this.casterUI = casterUI
    }

    excute(): void {
        this.casterUI.goBack()
        EventMgr.ins.event(EventId.BATTLE_STATE, BattleState.ROLE_ACTION_END)
    }
}